SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_PWSyncDashBoard_GetSyncStatus]
	@LastSyncStatusesId INT
AS
BEGIN
	
	DECLARE @sql NVARCHAR(MAX)
	
	
	SET @SQL = '
					SELECT 
						[LastSyncStatusesId], [DBName], [PWVersion], [SyncStatsID], 
						[CAPName], [PWAP_AppSchemas], [PWAP_location], [RunTime], [Succeeded], [FailedStep],
						[FailAt], [ErrorDetail], [StepDetails], [DelRec], [ModRec], [NewRec], [Timestamp]
					FROM DnnProduct_PWSyncDashBoard_LastSyncStatuses
					WHERE [LastSyncStatusesId] = @LastSyncStatusesId
				'
	
	EXECUTE sp_executesql @SQL, N'@LastSyncStatusesId INT', @LastSyncStatusesId

END
GO
